<!doctype html>
<html lang="en" class="fixed">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>教师列表</title>
    <link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
    <link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="stylesheet" type="text/css" href="http://static.test-crm.classba.com.cn/assets/plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://static.test-crm.classba.com.cn/assets/plugins/animate.css/animate.css">
    <link rel="stylesheet" href="http://static.test-crm.classba.com.cn/assets/plugins/font-awesome/css/font-awesome.css">
    <link rel="stylesheet" href="http://static.test-crm.classba.com.cn/assets/plugins/data-table/media/css/dataTables.bootstrap.min.css">
    <link rel="stylesheet" href="http://static.test-crm.classba.com.cn/assets/plugins/ztree/css/zTreeStyle/zTreeStyle.css">
    <link rel="stylesheet" href="http://static.test-crm.classba.com.cn/app/css/style.css">
    <link rel="stylesheet" href="http://static.test-crm.classba.com.cn/assets/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="http://static.test-crm.classba.com.cn/app/css/app.css">

    <!-- bootstarp css -->
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <!-- bootstarp css -->
    <link rel="stylesheet" href="style/main.css">
</head>

<body>
    <div class="fix-head">
        <h1 style="color:#fff">LOGO</h1>
    </div>
    <div class="row class-wrap">
        <div class="col-md-1 nav-wrap">

            <nav id="nav" class="navbar-default navbar-static-side" role="navigation">
                <div class="sidebar-nav">
                    <ul id="tree7" class="tree">
                        <li>
                            <a href="">短信管理</a>
                        </li>
                        <li>
                            <a href="">用户列表</a>
                        </li>
                        <li>
                            <a href="">分组管理</a>
                        </li>
                        <li>
                            <a href="">角色权限</a>
                        </li>
                    </ul>

                </div>
            </nav>

        </div>
        <div class="col-md-11 class-main">
            <div class="class-box">
                <div class="class-box-head">
                    <div class="class-box-title">
                        <h3>基本信息</h3>
                    </div>
                </div>
                <div class="class-box-body">
                    <div class="form-horizontal">
                            
                        <div class="form-group">
                            <label class="col-sm-1 control-label">查看范围：</label>
                            <div class="col-sm-7">
                                <input type="text" name="sname" class="form-control" value="yaoyingyu">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">修改日期：</label>
                            <div class="col-sm-2">
                                <input type="text" name="sname" class="form-control" value="yaoyingyu">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                    </div>
                    <div class="btns-group">
                        <button class="btn btn-white btn-lg" id="cancel">取消</button>
                        <button class="btn btn-primary btn-lg" id="save">确定</button>
                    </div>
                </div>
            </div>
            <div class="class-box">
                <div class="class-box-head">
                    <form action="/teacher/teacher/list" method="get" enctype="application/x-www-form-urlencoded">
                        <div class="class-box-title">
                            <h3>老师列表</h3>
                            <div class="class-box-tools"><a class="btn-white" id="excel" url="/ajax/teacher/Teacher/excel">导出</a></div>
                        </div>
                        <div class="from-top row">
                            <div class="from-top-left col-md-6">
                                <a class="btn btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/addteacher',title:'分配TMK'})" >分配TMK</a>
                                <a class="btn btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/addteacher',title:'分配CC'})" >分配CC</a>
                                <select class="form-control" name="level">
                                    <option value="" selected="selected">更多操作</option>
                                    <option value="star_three">删除</option>
                                    <option value="star_two">修改</option>
                                </select>
                            </div>
                            <div class="from-top-right col-md-6">
                                <div class="form-group col-md-6">
                                    <input type="file" name="stu_import" class="btn btn-white btn_import" id="stu_import">
                                </div>
                                <div class="col-md-6">
                                    <!--     <a class="layui-btn layui-btn-default" href="-->
                                    <!--" target="_blank">添加老师</a>-->
                                    <a class="btn btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/addteacher',title:'导入'})" >导入</a>
                                    <a class="btn  btn-sub" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/addteacher',title:'导出'})" >导出</a>
                                    <a class="btn  btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/addteacher',title:'添加'})" >添加</a>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

                <div class="class-box-body">
                    <table class="layui-form table table-bordered table-hover table table-bordered table-striped">
                        <thead>
                            <tr>
                                <th class="sorting_desc">
                                    <input type="checkbox" lay-filter="allChoose" lay-skin="primary" name="checkAll">
                                </th>
                                <th><a href="/teacher/teacher/list?orderby=1">姓名</a></th>
                                <th>科目</th>
                                <th>级别</th>
                                <th>最大同时授课</th>
                                <th>天王星ID</th>
                                <th>性别</th>
                                <th>教育水平</th>
                                <th>QQ</th>
                                <th>手机号</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>

                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="803">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=803',title:'教师信息'})" >益阳刘德华</a></td>
                                <td>其它,化学,物理,英语,数学,语文</td>
                                <td>明星三级</td>
                                <td>255</td>
                                <td>2222</td>
                                <td>男</td>
                                <td>博士</td>
                                <td></td>
                                <td>18049880399</td>
                                <td>正式</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=803',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="803">删除</a>
                                </td>
                            </tr>

                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="778">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=778',title:'教师信息'})" >老师1546121o5</a></td>
                                <td>语文,化学</td>
                                <td>明星三级</td>
                                <td>1</td>
                                <td>34746</td>
                                <td>男</td>
                                <td>本科</td>
                                <td>ixohrprkl</td>
                                <td>13935188115</td>
                                <td>实习</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=778',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="778">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="790">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=790',title:'教师信息'})" >老师154612vub</a></td>
                                <td>语文,英语</td>
                                <td>普通</td>
                                <td>2</td>
                                <td>22328</td>
                                <td>男</td>
                                <td>博士</td>
                                <td>hffamqkfhm</td>
                                <td>13988907236</td>
                                <td>离职</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=790',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="790">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="791">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=791',title:'教师信息'})" >老师154612y8e</a></td>
                                <td>化学,英语,数学</td>
                                <td>明星三级</td>
                                <td>1</td>
                                <td>19323</td>
                                <td>女</td>
                                <td>博士</td>
                                <td>bznrdfpqp</td>
                                <td>13907283559</td>
                                <td>离职</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=791',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="791">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="792">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=792',title:'教师信息'})" >老师154612j9t</a></td>
                                <td>语文,数学</td>
                                <td>普通</td>
                                <td>2</td>
                                <td>32268</td>
                                <td>女</td>
                                <td>本科</td>
                                <td>hgdsinrety</td>
                                <td>13966413805</td>
                                <td>离职</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=792',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="792">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="598">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=598',title:'教师信息'})" >老师154506367</a></td>
                                <td>化学,数学</td>
                                <td>明星二级</td>
                                <td>2</td>
                                <td>25543</td>
                                <td>男</td>
                                <td>大专</td>
                                <td>qzgwplwflg</td>
                                <td>13960288948</td>
                                <td>实习</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=598',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="598">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="587">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=587',title:'教师信息'})" >老师154505gjf</a></td>
                                <td>语文,英语</td>
                                <td>高级</td>
                                <td>3</td>
                                <td>55495</td>
                                <td>男</td>
                                <td>本科</td>
                                <td>khzsmgao</td>
                                <td>13955321187</td>
                                <td>离职</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=587',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="587">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="586">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=586',title:'教师信息'})" >老师154505gko</a></td>
                                <td>语文,英语</td>
                                <td>明星二级</td>
                                <td>1</td>
                                <td>67656</td>
                                <td>女</td>
                                <td>硕士</td>
                                <td>stvuxzltt</td>
                                <td>13916571751</td>
                                <td>试用期</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=586',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="586">删除</a>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" lay-filter="itemChoose" name="ck" lay-skin="primary" id="585">
                                </td>
                                <td><a href="javascript:window.parent.addParentTab({href:'/teacher/teacher/info?id=585',title:'教师信息'})" >老师1545056ro</a></td>
                                <td>语文,英语</td>
                                <td>普通1</td>
                                <td>1</td>
                                <td>92537</td>
                                <td>男</td>
                                <td>本科</td>
                                <td>xjfoqvjiv</td>
                                <td>13993975498</td>
                                <td>离职</td>
                                <td>
                                    <!--            <a class="btn-primary" href="-->
                                    <!--" target="_blank">编辑</a>-->
                                    <a class="btn-primary" href="javascript:window.parent.addParentTab({href:'/teacher/teacher/edit?id=585',title:'编辑'})" >编辑</a>
                                    <a class=" btn-sub" tid="585">删除</a>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <ul class="pagination">
                        <li class="disabled"><span>&laquo;</span></li>
                        <li class="active"><span>1</span></li>
                        <li><a href="/teacher/teacher/list?page=2">2</a></li>
                        <li><a href="/teacher/teacher/list?page=3">3</a></li>
                        <li><a href="/teacher/teacher/list?page=4">4</a></li>
                        <li><a href="/teacher/teacher/list?page=2">&raquo;</a></li>
                    </ul>
                    <input type="hidden" name="delteacher" value="http://test-crm.classba.com.cn/ajax/teacher/Teacher/delTeacher">
                </div>

            </div>
        </div>
    </div>

    <script src="http://static.test-crm.classba.com.cn/assets/plugins/jquery/jquery.min.js"></script>
    <script src="http://static.test-crm.classba.com.cn/assets/plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="http://static.test-crm.classba.com.cn/assets/plugins/data-table/media/js/jquery.dataTables.min.js"></script>
    <script src="http://static.test-crm.classba.com.cn/assets/plugins/data-table/media/js/dataTables.bootstrap.min.js"></script>
    <script src="http://static.test-crm.classba.com.cn/assets/plugins/data-table/extensions/Responsive/js/dataTables.responsive.min.js"></script>
    <script src="http://static.test-crm.classba.com.cn/assets/plugins/data-table/extensions/Responsive/js/responsive.bootstrap.min.js"></script>
    <script src="http://static.test-crm.classba.com.cn/assets//plugins/ztree/js/jquery.ztree.core.js"></script>
    <script src="http://static.test-crm.classba.com.cn/assets/plugins/layui/layui.all.js" charset="utf-8"></script>
    <script type="text/javascript" src="http://static.test-crm.classba.com.cn/assets//plugins/ztree/js/jquery.ztree.excheck.js"></script>
    <script type="text/javascript" src="http://static.test-crm.classba.com.cn/assets//plugins/ztree/js/jquery.ztree.exedit.js"></script>

    <!-- bootstrap js  -->
    <script src="bootstrap/js/bootstrap.js"></script>
    <!-- bootstrap js  -->

    <script>
    $(function() {
        $(".layui-btn-danger").on("click", function() {
            if (confirm("确定删除本条数据吗？")) {
                var del_url = $("input[name='delteacher']").val();
                var tid = $(this).attr('tid');
                $.ajax({
                    url: del_url,
                    type: 'post',
                    dataType: 'josn',
                    data: { id: tid },
                    success: function(resp) {
                        if (resp.success == 1) {
                            alert('删除成功!');
                            location.reload();
                        } else {
                            alert('删除失败~!');
                            location.reload();
                        }
                    }
                })

            }
        })
    });

    layui.use(['form'], function() {
        var form = layui.form;
        form.on('checkbox(allChoose)', function(data) {
            var child = $(data.elem).parents('table').find('tbody input[type="checkbox"]');
            child.each(function(index, item) {
                item.checked = data.elem.checked;
            });
            form.render('checkbox');
        });
        form.on('checkbox(itemChoose)', function(data) {
            var sib = $(data.elem).parents('table').find('tbody input[type="checkbox"]:checked').length;
            var total = $(data.elem).parents('table').find('tbody input[type="checkbox"]').length;
            if (sib == total) {
                $(data.elem).parents('table').find('thead input[type="checkbox"]').prop("checked", true);
                form.render();
            } else {
                $(data.elem).parents('table').find('thead input[type="checkbox"]').prop("checked", false);
                form.render();
            }
        });
    });

    /* $("input[name='checkAll']").on('click',function () {

     })*/
    $("#excel").on('click', function() {
        var aIDs = [];
        $('input[name="ck"]:checked').each(function() {
            aIDs.push($(this).attr('id'));
        });
        if (aIDs.length == 0) {
            layer.alert("至少选择一项");
        } else {
            $.ajax({
                url: $(this).attr('url'),
                data: {
                    ids: aIDs,
                },
                type: 'post',
                dataType: 'json',
                success: function(data) {
                    if (data.success == 1) {
                        window.open(data.data);
                    } else {

                    }
                },
                complete: function() {},
                error: function() {

                }
            });
        }
    });
    </script>
    <script src="js/main.js"></script>
</body>

</html>